package com.hkemmm.model;

import com.hkemmm.db.DBProvider;

import java.util.List;
import java.util.Map;

public class UserModel {
    public boolean canLogin(String userName, String userPsw) {
        boolean canLogin = false;

        DBProvider db = new DBProvider();
        String str = "select * from userinfo where userName = ? and userPsw = ?";

        List<Map<String, Object>> listMap= db.queryListMap(str, userName, userPsw);

        if(listMap.size()>=1 ){
            canLogin = true;
        }

        return canLogin;
    }
}
